// 创建应用实例方法
import { createApp } from "vue";
// 导入根组件
import App from "./App.vue";
// 导入全局样式
import "@/style/reset.scss";
// 导入element-plus
import ElementPlus from "element-plus";
// 导入element-plus样式
import "element-plus/dist/index.css";
// el 国际化
import zhCn from "element-plus/es/locale/lang/zh-cn";
// 导入路由
import router from "@/router/index.ts";

import HospitalTop from "@/components/hospital_top/index.vue";
import HospitalBottom from "@/components/hospital_bottom/index.vue";
import Login from "@/components/login/index.vue";
import Visitor from "@/components/visitor.vue";
import pinia from "@/store";
import "./permisstion.ts";
// 创建应用实例
let app = createApp(App);
// 挂载根组件
app.component("HospitalTop", HospitalTop);
app.component("HospitalBottom", HospitalBottom);
app.component("Login", Login);
app.component("Visitor", Visitor);

// 安装路由
app.use(router);
// 安装element-plus
// 使用国际化
app.use(ElementPlus, {
  locale: zhCn,
});
// 安装pinia
app.use(pinia);
// 挂载应用实例
app.mount("#app");
